/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.pangalacteos.modelo;

/**
 *
 * @author Leandro Del Sole
 */
public class DBField {
    private String name;
    private DBFieldType dbFieldType;

    public DBField(){}
    
    public DBField(String name, DBFieldType dbFieldType){
        this.name = name;
        this.dbFieldType = dbFieldType;
    }
    
    public DBField(String name, String dbFieldType){
        this.name = name;
        this.dbFieldType = DBFieldType.valueOf(dbFieldType.toUpperCase());
    }
    
    public DBFieldType getDbFieldType() {
        return dbFieldType;
    }

    public void setDbFieldType(DBFieldType dbFieldType) {
        this.dbFieldType = dbFieldType;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }
    
    @Override
    public String toString(){
        return "DBField[name="+name+",DBFieldType="+dbFieldType+"]";
    }

}
